package com.ygxsk.carhome.response;

import android.os.Parcel;
import android.os.Parcelable;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by itchenqi on 2018/1/22 0022.
 * description：这个是团购列表内的实体。家具的实体和装修js交互的也是这个实体
 */
public class GoodsBean implements Parcelable {


    //商品的id信息
    private int productId;

    /**
     * 图片信息内容，商品图片
     */
    private String logoImg;

    //@JSONField(name = "productDetail")
    private String productDetail;

    /**
     * 标题内容也是商品名称
     */
    private String productFullName;
    //private String productName;

    /**
     * 商品的抢购状态活动状态，0未开始，1已开始
     */
    private int promotionStatus;

    /**
     * 商品的总量--库存信息
     */
    private String storeInfo;

    /**
     * 可用库存信息
     */
    private int availableStore;

    /**
     * 已经团购了多少剩余多少库存信息--现有库存
     */
    private String existingStore;

    /**
     * 商品团购的开始时间
     */
    private String beginTime;

    /**
     * 提货日期--也是结束时间
     */
    private Date endTime;

    /**
     * 提货地址信息
     */
    private String pickingAddInfo;

    /**
     * 当限购时，最大购买量
     */
    private int maxPayAmount;

    /**
     * 当限购时，最小购买量
     */
    private int minPayAmount;


    /**
     * 单位商品单位
     */
    private String productUnit;

    /**
     * 价格信息
     */
    private BigDecimal salesPrice;

    /**
     * 预售商品的展示预售价格
     */
    private BigDecimal preSalePrice;

    /**
     * 只有预售价格变动使用这个
     */
    private BigDecimal productSalePrice;

    /**
     * SKU
     */
    private String barCode;

    /**
     * 是否限购，0否，1是
     */
    private int isMinPay;

    /**
     * 购买信息库存多少剩余多少
     */
    private String purchaseInfo;

    /**
     * 规格
     */
    private String specification;

    /**
     * 结束时间
     */
    private String pickingTimeInfo;

    /**货币符号--这个在systemconfig中有写入*/
    //private String textviewfuhao;

    /**
     * 是否上架，0否，1是
     */
    private int isPutSale;


    //itchen手动添加的用于识别是否选中的状态内容
    private int isChecked;

    //========================================
    private int companyId;

    /**
     * 创建的时间
     */
    private String createTime;

    /**
     * 实际的购物车的商品的数量
     */
    private int productCount;

    /**
     * 社区管家的团购商品价格
     */
    private BigDecimal promotionPrice;

    /**
     * 商品的原始价格
     */
    private BigDecimal marketPrice;


    //预售开始时间和预售结束时间
    private Date startTime;

    /**
     * 预售的提货时间
     */
    private Date carryGoodsTime;


    public BigDecimal getProductSalePrice() {
        return productSalePrice;
    }

    public void setProductSalePrice(BigDecimal productSalePrice) {
        this.productSalePrice = productSalePrice;
    }

    public BigDecimal getPreSalePrice() {
        return preSalePrice;
    }

    public void setPreSalePrice(BigDecimal preSalePrice) {
        this.preSalePrice = preSalePrice;
    }

    public Date getCarryGoodsTime() {
        return carryGoodsTime;
    }

    public void setCarryGoodsTime(Date carryGoodsTime) {
        this.carryGoodsTime = carryGoodsTime;
    }

    public BigDecimal getMarketPrice() {
        return marketPrice;
    }

    public void setMarketPrice(BigDecimal marketPrice) {
        this.marketPrice = marketPrice;
    }

    public int getCompanyId() {
        return companyId;
    }

    public void setCompanyId(int companyId) {
        this.companyId = companyId;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public int getProductCount() {
        return productCount;
    }

    public void setProductCount(int productCount) {
        this.productCount = productCount;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public String getLogoImg() {
        return logoImg;
    }

    public void setLogoImg(String logoImg) {
        this.logoImg = logoImg;
    }

//    public String getProductName() {
//        return productName;
//    }

//    public void setProductName(String productName) {
//        this.productName = productName;
//    }


    public String getProductFullName() {
        return productFullName;
    }

    public void setProductFullName(String productFullName) {
        this.productFullName = productFullName;
    }

    public int getPromotionStatus() {
        return promotionStatus;
    }

    public void setPromotionStatus(int promotionStatus) {
        this.promotionStatus = promotionStatus;
    }

    public String getStoreInfo() {
        return storeInfo;
    }

    public void setStoreInfo(String storeInfo) {
        this.storeInfo = storeInfo;
    }

    public int getAvailableStore() {
        return availableStore;
    }

    public void setAvailableStore(int availableStore) {
        this.availableStore = availableStore;
    }

    public String getExistingStore() {
        return existingStore;
    }

    public void setExistingStore(String existingStore) {
        this.existingStore = existingStore;
    }

    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getPickingAddInfo() {
        return pickingAddInfo;
    }

    public void setPickingAddInfo(String pickingAddInfo) {
        this.pickingAddInfo = pickingAddInfo;
    }

    public int getMaxPayAmount() {
        return maxPayAmount;
    }

    public void setMaxPayAmount(int maxPayAmount) {
        this.maxPayAmount = maxPayAmount;
    }

    public int getMinPayAmount() {
        return minPayAmount;
    }

    public void setMinPayAmount(int minPayAmount) {
        this.minPayAmount = minPayAmount;
    }

    public String getProductUnit() {
        return productUnit;
    }

    public void setProductUnit(String productUnit) {
        this.productUnit = productUnit;
    }

    public BigDecimal getSalesPrice() {
        return salesPrice;
    }

    public void setSalesPrice(BigDecimal salesPrice) {
        this.salesPrice = salesPrice;
    }

    public String getBarCode() {
        return barCode;
    }

    public void setBarCode(String barCode) {
        this.barCode = barCode;
    }

    public int getIsMinPay() {
        return isMinPay;
    }

    public void setIsMinPay(int isMinPay) {
        this.isMinPay = isMinPay;
    }

    public String getPurchaseInfo() {
        return purchaseInfo;
    }

    public void setPurchaseInfo(String purchaseInfo) {
        this.purchaseInfo = purchaseInfo;
    }

    public String getSpecification() {
        return specification;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    public String getPickingTimeInfo() {
        return pickingTimeInfo;
    }

    public void setPickingTimeInfo(String pickingTimeInfo) {
        this.pickingTimeInfo = pickingTimeInfo;
    }

    public int getIsChecked() {
        return isChecked;
    }

    public void setIsChecked(int isChecked) {
        this.isChecked = isChecked;
    }


    public BigDecimal getPromotionPrice() {
        return promotionPrice;
    }

    public void setPromotionPrice(BigDecimal promotionPrice) {
        this.promotionPrice = promotionPrice;
    }


    public int getIsPutSale() {
        return isPutSale;
    }

    public void setIsPutSale(int isPutSale) {
        this.isPutSale = isPutSale;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.productId);
        dest.writeString(this.logoImg);
        dest.writeString(this.productFullName);
        dest.writeInt(this.promotionStatus);
        dest.writeString(this.storeInfo);
        dest.writeInt(this.availableStore);
        dest.writeString(this.existingStore);
        dest.writeString(this.beginTime);
        //dest.writeString(this.endTime);
        dest.writeString(this.pickingAddInfo);
        dest.writeInt(this.maxPayAmount);
        dest.writeInt(this.minPayAmount);
        dest.writeString(this.productUnit);
        dest.writeSerializable(this.salesPrice);
        dest.writeString(this.barCode);
        dest.writeInt(this.isMinPay);
        dest.writeString(this.purchaseInfo);
        dest.writeString(this.specification);
        dest.writeString(this.pickingTimeInfo);
        dest.writeInt(this.isPutSale);
        dest.writeInt(this.isChecked);
        dest.writeInt(this.companyId);
        dest.writeString(this.createTime);
        dest.writeInt(this.productCount);
        dest.writeSerializable(this.promotionPrice);
    }

    public GoodsBean() {
    }

    protected GoodsBean(Parcel in) {
        this.productId = in.readInt();
        this.logoImg = in.readString();
        this.productFullName = in.readString();
        this.promotionStatus = in.readInt();
        this.storeInfo = in.readString();
        this.availableStore = in.readInt();
        this.existingStore = in.readString();
        this.beginTime = in.readString();
        //this.endTime = in.readString();
        this.pickingAddInfo = in.readString();
        this.maxPayAmount = in.readInt();
        this.minPayAmount = in.readInt();
        this.productUnit = in.readString();
        this.salesPrice = (BigDecimal) in.readSerializable();
        this.barCode = in.readString();
        this.isMinPay = in.readInt();
        this.purchaseInfo = in.readString();
        this.specification = in.readString();
        this.pickingTimeInfo = in.readString();
        this.isPutSale = in.readInt();
        this.isChecked = in.readInt();
        this.companyId = in.readInt();
        this.createTime = in.readString();
        this.productCount = in.readInt();
        this.promotionPrice = (BigDecimal) in.readSerializable();
    }

    public static final Creator<GoodsBean> CREATOR = new Creator<GoodsBean>() {
        @Override
        public GoodsBean createFromParcel(Parcel source) {
            return new GoodsBean(source);
        }

        @Override
        public GoodsBean[] newArray(int size) {
            return new GoodsBean[size];
        }
    };
}
